CONFIG_MODULE_SIG = n
DEVICE_MODULE_NAME = device
DRIVER_MODULE_NAME = driver
obj-m += $(DEVICE_MODULE_NAME).o
obj-m += $(DRIVER_MODULE_NAME).o
$(DEVICE_MODULE_NAME)-objs = demo_device.o
$(DRIVER_MODULE_NAME)-objs = demo_driver.o

APP_NAME = demo_app

CC = gcc

all:
	echo $(DRIVER_MODULE_NAME)
	echo $(DEVICE_MODULE_NAME)
	$(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
	$(CC) $(APP_NAME).c -o $(APP_NAME)

clean:
	$(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
	rm $(APP_NAME)


